package com.mutouren.modules.org.model;

import java.util.Date;

import com.mutouren.common.entity.ValidState;

public class Person {
	
	private Integer personId;
	private String loginName;
	private String password;
	private Integer salt;
	
	//@NotNull(message="orgId不能为空")
	private Integer orgId;
	private String name;
	private String code;
	private String sex;
	
	//@DateTimeFormat(pattern = "yyyy-MM-dd")  
	private Date birthday;
	private String email;
	private String mobile;
	private String description;
	private Date passwordModifyTime;
	private Date lastLoginTime;
	private ValidState validState;
	private Date createTime;
	private Date updateTime;
	
	private int relateOrgId;
	
	private String orgPath;
	private String relateOrgPath;
	
	public Person() {
		this.validState = ValidState.Normal;
	}		
	public Integer getPersonId() {
		return personId;
	}
	public void setPersonId(Integer personId) {
		this.personId = personId;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Integer getSalt() {
		return salt;
	}
	public void setSalt(Integer salt) {
		this.salt = salt;
	}
	public Integer getOrgId() {
		return orgId;
	}
	public void setOrgId(Integer orgId) {
		this.orgId = orgId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Date getPasswordModifyTime() {
		return passwordModifyTime;
	}
	public void setPasswordModifyTime(Date passwordModifyTime) {
		this.passwordModifyTime = passwordModifyTime;
	}
	public Date getLastLoginTime() {
		return lastLoginTime;
	}
	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	public String getDisplayValidState() {
		return ValidState.display(validState);
	}	
	public ValidState getValidState() {
		return validState;
	}
	public void setValidState(ValidState validState) {
		this.validState = validState;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public int getRelateOrgId() {
		return relateOrgId;
	}
	public void setRelateOrgId(int relateOrgId) {
		this.relateOrgId = relateOrgId;
	}
	public boolean getIsMainPos() {
		return this.getOrgId() == this.getRelateOrgId();
	}

	public String getOrgPath() {
		return orgPath;
	}
	public void setOrgPath(String orgPath) {
		this.orgPath = orgPath;
	}
	public String getRelateOrgPath() {
		return relateOrgPath;
	}
	public void setRelateOrgPath(String relateOrgPath) {
		this.relateOrgPath = relateOrgPath;
	}
}
